// 封装请求函数调用api
import { getBannersAPI, getCategoryAPI, getHotsAPI, getNewGoodsAPI } from "@/api/home";

const loadBanners = async (banners) => {
    const { result } = await getBannersAPI()
    console.log(result);
    banners.value = result
}
// 封装前台泪目请求函数调用api
const loadCategory = async (Category) => {
    const { result } = await getCategoryAPI()
    
    console.log(result);
    Category.value = result
}
// 封装推荐请求函数调用api
const loadHots = async (hots) => {
    const { result } = await getHotsAPI()
    console.log(result);
    hots.value = result
}
// 封装新鲜好物请求函数调用api
const loadNewGoods = async (newGoods) => {
    const { result } = await getNewGoodsAPI()
    console.log(result);
    newGoods.value = result
}
export {
loadBanners,
loadCategory,
loadHots,
loadNewGoods,

 }